Method and system for developing a telecommunication application for performing call-processing functions in a programmable telecommunication switch

ABSTRACT

A telecommunications protocol development environment which enables a user to define a separate finite state machine for each port or channel provided by a programmable telecommunications switch. Protocols for various telecommunications applications and software layers may be developed.

This application is a continuation of application Ser. No. 08/790,808, filed on Jan. 30, 1997, now abandoned, which is a continuation of application Ser. No. 08/624,005, filed on Mar. 27, 1996, now abandoned, which is a divisional of application Ser. No. 08/134,122, filed on Oct. 8, 1993, and issued as U.S. Pat. No. 5,426,694 on Jun. 20, 1995.

SUMMARY OF THE INVENTION

1. Field of the Invention

The present invention relates generally to the field of telecommunications and, more specifically, to programmable telecommunication switches and controlling external computers supporting various telecommunications applications.

2. Discussion of the Prior Art

Programmable telecommunication switches are used in a wide variety of applications such as voice messaging, telemarketing services and the like. A programmable switch is usually controlled by a host device, which is typically a computer that runs a telecommunications application program. A customer may either purchase a commercially available application program that is compatible with the host and switch hardware or may elect to write a custom program.

In most applications, a programmable switch is connected to a public telephone network by one or more analog trunks or digital spans (e.g., a T1 span) which are terminated at the switch. The switch may also terminate one or more "lines" which are connected to devices such as telephone sets. Communication over any given trunk, span or line is carried out in accordance with an assigned signalling protocol.

Throughout the world, there are numerous "standard" signalling protocols in use. Some protocols which are widely used at present are E&M wink start, loopstart, groundstart and international compelled R2 using DTMF/MFR1 or MFR2 address signalling.

In conventional programmable switches, the selection of which signalling protocol is used with respect to a particular trunk, span or line is generally made before the equipment is delivered to the customer. That is, the switch manufacturer configures the switch, which may involve aspects of hardware or firmware or both, usually in a manner which cannot easily or quickly be changed (i.e., through firmware stored in a PROM). The manufacturer's configuration effectively assigns a particular signalling protocol for each trunk, span or line.

Several problems arise, however, with such conventional configuration. First, there is the lack of flexibility for a user to configure the switch as desired for a particular application. This is especially problematic where a need arises to customize, even infrequently, the specified signalling protocols after initial installation of the switch.

Another problem with conventional programmable switches relates to their inability to dynamically change the signalling protocol specified for a particular trunk, span or line. This problem may occur with some frequency in Europe where different compelled R2 signalling protocols are used in different countries or in any country where internationally originated calls are being generated through a tandem switching arrangement. The undesirable result is that the switch will probably not be able to properly handle the incoming call.

Another major disadvantage of conventional programmable switches is that they offer no capability for the user to easily develop and implement custom signalling protocols for applications. Custom protocols may be desirable, if not necessary, in applications where the switch is connected between the public telephone network and other devices (e.g., a voice messaging system). Because such devices may perform specialized functions and are not intended to connect directly to the public telephone network, they do not typically adhere to standard signalling protocols. Thus, there is a need for the user to be able to control the programmable switch in such a fashion that proper communication is maintained both with the public telephone network and with other devices connected to the switch.

Yet another disadvantage of conventional programmable switches is that they require excessively frequent intervention by the host device in order to process calls. For example, in a conventional switch, host intervention (i.e., an exchange of messages between the switch and host device) is typically required to either transmit or receive digits. This is necessary because the host device must instruct the switch to apply appropriate, available resources for the task at hand. In this example, the host might instruct the switch to connect an available tone generator to a particular channel to send digits, or connect a tone receiver to receive digits. In the context of an application where hundreds to possibly tens of thousands of calls per hour are processed by a switch, the number of messages that must be passed between the host and switch becomes quite large, which often results in reduced host and switch performance.

SUMMARY OF THE INVENTION

In brief summary, the present invention provides a programmable telecommunication switch which provides a user with the ability to define and assign on a port-by-port basis a desired signalling protocol, either "standard" or custom in nature, for handling either incoming or outgoing calls. Multiple signalling protocols may be simultaneously resident in the switch and the protocol assignment of a given port may be dynamically changed in real time.

The invention provides a protocol development environment which enables the user to define a separate finite state machine for each port or channel provided by the switch. Each finite state machine may be independently defined by combining a series of elementary processing steps, called atomic functions, into primitives, which are in turn combined with states and events to define the desired state machine. Such state machines may include wait states, which are preferably used to reduce the involvement of the host device in processing calls. Wait states may represent programmable timed periods which provide an opportunity for expected actions or events to occur before the switch performs the next operations.

In addition, the present invention may serve as a development tool for telecommunications applications such as personal communications services (PCS), 800/900 service, voice mail, telemarketing, among others. The present invention may also be used to control or manage a wide variety of communications services within a programmable switch, including conferencing, voice recorded announcements, tone generation, tone reception, call progress analysis, voice recognition, voice compression and fax encoding/decoding.

BRIEF DESCRIPTION OF THE DRAWINGS

This invention is pointed out with particularity in the appended claims. The above and further advantages of this invention may be better understood by referring to the following description taken in conjunction with the accompanying drawings, in which:

FIG. 1 is a block diagram of a programmable telecommunications switch which may be programmed by a user in accordance with a preferred embodiment of the present invention;

FIG. 2 is diagram which depicts the layers of software used to control the switch of FIG. 1;

FIG. 3A and 3B depict some of the specific features and functions associated with each of the software layers 2-5 depicted in FIG. 2;

FIG. 4 is a block diagram of a finite state machine development environment constructed in accordance with a preferred embodiment of the present invention;

FIG. 5 is a block diagram of a layer 3 (network layer) application in which finite state machines are used to assign desired network signalling protocols to various ports of a programmable switch;

FIG. 6A is a state diagram of a finite state machine for providing tone control in link layer 2 (link layer) application;

FIG. 6B is a diagram of the finite state machine of FIG. 6A in which each series of atomic functions is defined as a primitive;

FIG. 6C is a group of tables which show the correspondence between the atomic functions, primitives and states of FIG. 6B;

FIG. 7A is a state diagram of a finite state machine for processing the initial phase of call setup using international compelled R2 signalling in a layer 3 (network layer) application;

FIG. 7B is a diagram of the finite state machine of FIG. 7A in which each series of atomic functions is defined as a primitive;

FIG. 7C is a group of tables which show the correspondence between the atomic functions, primitives and states of FIG. 7B;

FIG. 8A is a state diagram of a finite state machine for processing the initial phase of call setup using T1 E&M wink start signalling in a layer 3 (network layer) application;

FIG. 8B is a diagram of the finite state machine of FIG. 8A in which each series of atomic functions is defined as a primitive;

FIG. 8C is a group of tables which show the correspondence between the atomic functions, primitives and states of FIG. 8B;

FIG. 9A is a state diagram of a finite state machine for providing interactive voice response to an incoming call in a layer 4 (call management layer) application;

FIG. 9B is a diagram of the finite state machine of FIG. 9A in which each series of atomic functions is defined as a primitive;

FIG. 9C is a group of tables which show the correspondence between the atomic functions, primitives and states of FIGS. 9B;

FIG. 10A is a state diagram of a finite state machine for a layer 5 inbound application such as toll free (800) service;

FIG. 10B is a diagram of the finite state machine of FIG. 10A in which each series of atomic functions is defined as a primitive; and

FIG. 10C is a group of tables which show the correspondence between the atomic functions, primitives and states of FIG. 10B.

DETAILED DESCRIPTION OF AN ILLUSTRATIVE EMBODIMENT

FIG. 1 shows a commercially available personal computer (PC) 2 which includes a PC central processing unit (CPU) 4 and a hard disk drive 6 interconnected by a PC input/output (I/O) bus 8 and a PC power bus 9. The PC 2 is preferably a PC-AT®, sold by International Business Machines, or a compatible thereof. Other personal computers having more memory or more powerful CPUs than the PC-AT® may also be used. The PC 2 preferably operates under an application-oriented operating system, such as DOS® or UNIX®.

The PC 2 consists of a chassis or housing in which a motherboard is mounted, along with the disk drive 6 and other optional assemblies such as floppy disk drives, modems and the like. The PC CPU 4 is mounted on the motherboard, which includes a series of edge connectors into which other boards (cards) may be inserted and thereby connected to the PC I/O and power busses 8 and 9.

A programmable telecommunication switch 10 resides within the PC 2. A CPU/matrix card 12 is inserted into one of the slots on the motherboard and thus connected to the busses 8 and 9. The CPU/matrix card 12 is interconnected with a digital (T1) line card 14, a digital (E1) line card 15, a digital signal processing (DSP) card 16, a packet engine card 17, an analog (universal) line card 18 and a terminator card 19 by four busses: an HDLC or interprocessor bus 20; a TDM bus 22; a line card (LC) status/control bus 24; and a timing/control bus 26. A battery/ring voltage bus 28 supplies battery voltage (48VDC) and ringing voltage (109VAC) to the analog line card 18. The terminator card 19 serves to physically terminate busses 20, 22, 24, 26 and 28.

The line cards 14, 15 and 18 and the DSP card 16 are all connected to and receive their basic operating power from the PC power bus 9. Although only one digital (T1) line card 14, one digital (E1) line card 15 and one analog line card 18 are depicted, it should be understood that additional line cards of any type may be added subject to two physical limitations: (1) the maximum switching capacity of the CPU/matrix card 12, and (2) the physical space within the chassis of the PC 2.

An external host 30, which may comprise a separate personal computer, workstation or other computer, may optionally be connected via a communication channel 32 to the CPU/matrix card 12. The CPU/matrix card 12 preferably includes a conventional RS-232 compatible interface for connecting the channel 32. The external host 30 preferably operates under an application-oriented operating system.

If desired, the switch 10 can reside on a passive backplane (no PC CPU 4 or disk 6 present) from which its receives electrical power and be controlled by the external host 30.

An external battery/ring voltage supply 31 is connected via a path 33 to the terminator card 19. Supply 31 may comprise, for example, a commercially available power supply.

With the exception of the digital (E1) line card 15, the DSP card 16 and the packet engine card 17, details regarding the construction of the various cards shown in FIG. 1 are set forth in copending application Ser. No. 07/953,690, filed Sept. 29, 1992, which issued as U.S. Pat. No. 5,321,744 on Jun. 14, 1994, assigned to the assignee of the present application and which is hereby incorporated by reference. Digital (E1) line card 15 is preferably constructed using similar hardware to that disclosed for T1 line card 14, except for differences in conventional circuitry which allow line card 15 to terminate E1 spans as opposed to T1 spans.

Details regarding the construction of the DSP card 16 and the packet engine card 17 are set forth in copending application Ser. No. 08/001,113, filed Jan. 5, 1993, which issued as U.S. Pat. No. 5,349,579 on Sep. 20, 1994. assigned to the assignee of the present application and which is hereby incorporated by reference.

FIG. 2 is a layer model of the software used to control the programmable switch 10 of FIG. 1. The lefthand column of FIG. 2 shows seven layers defined in the Open Systems Interconnection (OSI) reference model. The righthand column of FIG. 2 shows five layers used to control switches 10 and their general correspondence to the OSI model.

Referring now to both FIGS. 1 and 2, the Application Layer 5, which corresponds generally with the Application layer of the OSI model, represents application software which typically runs on either the PC CPU 4 or the external host 30. Application Layer 5 software may be used to implement any of a number of desired telecommunications services such as toll free (800) service, voice mail, automatic call distribution (ACD), to name but a few.

Call Management Layer 4, which corresponds generally with the Presentation, Session and Transport layers of the OSI model, represents software which runs on the CPU/matrix card 12. Call Management Layer 4 is responsible for performing centralized call processing functions and providing a common interface to Application Layer 5 regardless of the type or types of network signalling protocols which may be used within the switch 10. Typically, Call Management Layer 4 performs functions which are required following call setup.

Network Signalling Protocol Layer 3 corresponds generally with the Network layer of the OSI model. The software represented by Network Signalling Protocol Layer 3 runs either on the CPU/matrix card 12 or on line cards which include their own microprocessors, such as line cards 14 or 15 or packet engine card 17, and is responsible for in and out-of-band network signalling supervision as well as network protocol level control of incoming and outgoing calls.

Link Layer 2 corresponds generally with the Data Link layer of the OSI model. Link Layer 2 software runs on the CPU/matrix card 12, the line cards which include their own microprocessors, the DSP card 16 or the packet engine card 17 (each of which includes its own microprocessor) and is responsible for the detection as well as physical transfer of network signalling information across a network or line interface.

Finally, the Physical Layer 1 corresponds to the Physical layer of the OSI model. Line cards 14, 15 and 18 provide physical T1, E1 and analog electrical interfaces, respectively, to the switch 10.

FIGS. 3A and 3B is a tabular listing of representative features and functions provided by each of the software Layers 2-5 of FIG. 2. The present invention may be used as a development tool to develop suitable software to implement any of the features and functions shown in FIGS. 3A and 3B. An illustrative example of the use of the present invention in the context of each of Layers 2-5 is described below in connection with FIGS. 6A-10C.

FIG. 4 is an overall block diagram of a finite state machine development environment, constructed in accordance with a preferred embodiment of the present invention, which enables a customer or user to create and define finite state machines for performing desired telecommunications functions. Before considering this Figure in detail, the definitions of certain terms should be addressed.

As used herein, the term state refers to a number which represents the current "context" for a particular channel or port. In a preferred embodiment of the present invention, there are three types of states defined: normal, internal and blocking. Normal states can be wait states (i.e., a SEIZE ACK state, a condition in which further action is suspended until the occurrence of a particular event) or stable states (i.e., a conversation is taking place). Internal states are used to test conditions and effectively operate as decision branches. Normal and internal states may be specified by a customer or user, in accordance with present invention, to define a finite state machine for performing a desired function. Blocking states are generated automatically by the present invention and are used, on a channel-by-channel basis, in connection with the management of off-board resources.

An event is a number which identifies a condition which is accepted by a particular state. Data may be associated with an event.

An atomic function is one which performs an elementary task such as setting a timer. User-specified data may be associated with an atomic function. A primitive is a predetermined sequence of atomic functions which is invoked upon the occurrence of a particular event. Users may create or define primitives from a library of available atomic functions. In a preferred embodiment, each primitive may contain up to 20 atomic functions.

A state/event table defines the valid events for a particular state and the primitive which is invoked upon the occurrence of each such event. In a preferred embodiment, a state/event table may contain up to 100 states and up to 40 events per state.

A primitive table defines the primitives which are used by a state/event table. In a preferred embodiment, a primitive table may contain up to 200 primitives.

A protocol is defined as the association of a state/event table with a primitive table and is identified by a protocol ID (a number).

A data block, such as those denoted by reference numbers 40a, 40n, is assigned for each channel (port) 0 . . . n of the switch. Each data block 40a, 40n contains the following information pertaining to its respective channel: the current state of the channel; a pointer to an-active state/event table; a pointer to an active primitive table; a pointer to an assigned state/event table; and a pointer to an assigned primitive table.

In the case of channel 0, the active-state/event table and active primitive table pointers are pointing, as indicated by the phantom lines, to tables which are associated with a resident protocol 0, denoted by reference number 42a. The assigned state/event table and assigned primitive table pointers for channel 0 are pointing to tables which are associated with a dynamically loaded, customer-defined protocol n+1, denoted by reference number 44a.

Other protocols which are present and available for use are resident protocols 1 . . . n (42b, 42c) and downloaded, customer-defined protocols n+2 . . . m (44b, 44c). The resident protocols 42a-42c represent preprogrammed or "standard" protocols, which are typically provided by a manufacturer with a switch. In contrast, the customer-defined protocols 44a-44c are created by a customer or user and may be completely "custom" or "proprietary" in nature.

A layer dependent atomic function library 46 is connected to provide information to a state machine engine 48. State machine engine 48 is also connected to receive the active state/event table pointer and active primitive table pointer from each of data blocks 40a-40n.

Also, as denoted by reference number 50, utilities are provided for layer dependent environment support.

The function of the state machine engine 48 is to drive each channel in accordance with its assigned protocol, which is defined by the assigned state/event table and assigned primitive table. Upon the occurrence of A valid event for a normal state, a primitive is invoked in accordance with the entries in the assigned state/event table. The state machine engine 48 uses the atomic function library 46 to perform the atomic functions represented by the invoked primitive.

The state machine engine 48 will drive through any necessary internal states, automatically generating appropriate blocking states, until the channel once again reaches a normal state. At that time, processing by the state machine engine 48 is complete until the occurrence of another valid event.

Each channel is initially assigned one of the customer-defined protocols or one of the preprogrammed protocols. This is accomplished by the transmission of a message from the Application Layer 5 to the Call Management Layer 4, which in turn issues an appropriate message to Layer 3. The assigned state/event table pointer and assigned primitive table pointer point to the protocol which was last assigned. Thus, a customer may assign a desired one of the available protocols by simply specifying the protocol ID. In this fashion, the present invention advantageously permits the customer to assign, on a channel-by-channel basis, a desired protocol from among multiple protocols resident within a single switch.

Alternatively, or if the customer elects not to assign protocols to some or all of the channels, default values are preferably provided so that each channel always has a valid protocol (e.g., one of the resident protocols 42a-42c) assigned to it.

The active state/event table and active primitive table pointers, which are provided to the state engine machine 48, point to the protocol (active) which is currently controlling the channel.

The active protocol used by a particular channel is not necessarily permanent and may be dynamically changed in real time in response to the occurrence of a specified event, as described in detail in connection with FIG. 5. Further, because the atomic functions provided by the library 46 represent elementary functions, customers or users are advantageously able to implement desired changes in protocols without substantial, or possibly any, changes to the underlying code. In addition, the environment support utilities are provided to simplify protocol development for the customer or user. The utilities provide ready-to-use resource management functions (e.g., timers) which greatly simplify the state machine logic required to implement desired protocols. Different utilities are preferably provided for each software layer since the resources required by each layer may be different.

FIG. 5 is a software diagram showing a representative use of the present invention in the context of the Network Signalling Protocol Layer 3. As mentioned above, Layer 3 software typically runs on either the CPU/matrix card 12, line cards 14 or 15 or packet engine card 17 of switch 2 (FIG. 1).

Data blocks 52a, 52n are assigned to each channel of the switch. In the case of channel 0, the active state/event table and active primitive table pointers are pointing, as indicated by the phantom lines, to tables which are associated with a resident out of service protocol 58a. The assigned state/event table and assigned primitive table pointers for channel 0 are pointing to tables which are associated with a downloaded, customer-defined network protocol n+1, denoted by reference number 60a.

Other protocols which are present and available for use are resident network protocols 58b, 58c and downloaded, customer-defined network protocol 60b, 60c.

A layer 3 atomic function library 54 is connected to provide information to the state machine engine 48.

The Layer 3 environment support utilities 56 include: receive line signalling/scanning management; digital signal processing (DSP) function activation/management; alarm/out-of-service (OOS) management, timer management; and dynamic memory management.

The active state/event table and active primitive table pointers, which are provided to the state engine machine 48, point to the protocol which is currently controlling the channel. Under normal operating conditions, the active protocol will be the same as the assigned protocol. However, in this figure, the active protocol is the out of service network protocol 0. This may have occurred, for example, because an alarm condition was detected on channel 0 and the channel automatically transitioned to the out of service network protocol 0.

The active protocol used by a particular channel is not necessarily permanent and may be dynamically changed in real time in response to the occurrence of a specified event. For example, as shown in FIG. 5, the assigned state/event table and assigned primitive table pointers for channel 0 are pointing to customer-defined network protocol 1 (60a). Assume that an incoming call is received on channel 0, but that the network signalling protocol of the incoming call is different than that of customer-defined network protocol 1 (60a). At this point, a message may be sent from Layer 3 to Layer 4 indicating that a change in the active protocol is needed in order to properly process the incoming call. In response, Layer 4 may simply reply with a message to Layer 3 to change the active protocol and proceed to process the incoming call, or may issue a message to Application Layer 5 to request instructions. Once the incoming call- is terminated, the channel may be reassigned its original protocol (or any other which is available within the switch) through a similar series of messages or by an atomic function in the active protocol.

A similar function may be performed in the case of an outgoing call. That is, if an available channel needed for an outgoing call is assigned a protocol which is not appropriate for the intended call (i.e., the dialed digits indicate that the call is destined for a foreign country which uses a different protocol), then the available channel's protocol may be dynamically changed by an appropriate message from Layer 4. Again, once the call is terminated, the channel may be reassigned its original or a different protocol as desired.

In FIG. 6A and those which follow, a state is depicted as a circle, an atomic function is depicted as a rectangular box, and an event is represented by a word abbreviation located along a path leading out of a state. Information shown in parentheses in an atomic function represents arguments or data that are associated with that function.

FIGS. 6A-6C are an example of the application of the present invention in the context of Link Layer 2.

The protocol begins with the associated channel in normal state 1 (NS1), which is the IDLE state 62. Upon the occurrence of the event of layer 3 to layer 2 setup for forward R2 signalling (L3₋₋ L2nSETUP₋₋ FOR₋₋ FWD₋₋ R2), a series of atomic functions are performed (af2, af3, af4, af5 and af1). Those atomic functions operate, respectively, to create an R2 reception node for a time slot, attach a DSP channel (e.g., a DSP chip acting as a tone receiver) for R2 decoding, send a layer 2 to layer 3 receiver attached message (L2₋₋ L3nRCVR₋₋ ATTACHED), set a timer (timer 1) and then set the next state to normal state 2 (NS2) 64. Note that the arguments associated with atomic function af5 are preferably used to specify a desired timer ID and an index into an array of predetermined timer values. The arguments associated with atomic function af1 are preferably used to specify the number of the next state and the type of the next state.

If the next event is the expiration of timer 1 (TIMER1₋₋ EXPIRATION), then atomic functions af10 and af11 are performed and the channel is returned to the IDLE state 62. However, if the next event is the receipt of a message from a DSP indicating silence was received (DSP₋₋ L2nRCVED₋₋ SILENCE), then atomic functions af5 (setting timer 1) and af1 (setting the next state) are performed, after which the protocol advances to normal state 3 (NS3) 66 in which it waits for R2 forward signals.

If the next event is the expiration of timer 1 (TIMER1--EXPIRATION), then atomic functions af10 and af11 are performed and the channel is returned to the IDLE state 62.

If the next event is the receipt of a message to transmit backward R2 signals (L3₋₋ L2nXMIT₋₋ BWD₋₋ R2₋₋ SIG), atomic function af12 is performed, which queues the backward R2 signals for later transmission, followed by a return to NS3 66. If the next event is a message indicating the receipt of forward R2 signals (DSP₋₋ L2nRCVED₋₋ R2₋₋ FWD₋₋ SIG), the atomic functions af7 (sending a report of the R2 signal to Layer 3), af8 (test whether backward R2 signal is queued for transmission) and af1 (set next state) are performed and the protocol advances to internal state 4 (IS4) 68.

If the next event is a true internal event (L2₋₋ INT₋₋ EVENT₋₋ 1) which indicates the backward R2 signal is queued, atomic function af9 (transmitting the queued backward R2 signal) is performed, followed by af5, af1 and the protocol returns to state 64. If the next event is a false internal event (L2₋₋ INT₋₋ EVENT₋₋ 0) which indicates the backward R2 signal is not queued, atomic function af5 (setting timer 1) is performed, followed by af1 (setting the next state) and the protocol advances to normal state 5 (NS5) 70. Upon the receipt of a message to transmit backward R2 signals (L3₋₋ L2nXMIT₋₋ BWD₋₋ R2₋₋ SIG), atomic functions af9, af5 and af1 are performed and the protocol returns to state 64.

Referring now to FIG. 6B, it may be seen that the each sequence of atomic functions shown in FIG. 6A has been defined as a primitive (primitives 1-7). In effect, each primitive provides a shorthand way to identify a desired sequence of atomic functions to invoke.

FIG. 6C shows a primitive table which lists in tabular format the sequence of atomic functions for each primitive in FIG. 6B, as well as a state/event table that defines the relationships between the states, events and primitives of FIG. 6B. In accordance with a preferred embodiment of the present invention, a customer wishing to create the protocol depicted in FIGS. 6A and 6B, would need only define the tables shown in FIG. 6C. Those tables would then be downloaded to the switch 2 (FIG. 1) through a series of messages from the host device.

FIG. 7A-7C are an example of the application of the present invention to a Network Protocol Layer 3 protocol for processing the initial phase of call setup using international compelled R2 signalling. The protocol begins with the associated channel in normal state 1 (NS1) 72, which is the IDLE state. Upon the occurrence of the event of receiving line signalling bits 0011 (which are the bit values that signal an inseizure), a series of atomic functions are performed (af17, af19, af21 and af1). Those atomic functions operate, respectively, to set the current inseize instruction list to the default switch list, set the current instruction index to 0, to test the current inseize instruction and then set the next state to internal state 2 (IS2) 74.

If the next event is a layer 3 internal event 0 (L3₋₋ INT₋₋ EVENT₋₋ 0), which signifies that the current inseize instruction was tested and found to be null, then atomic function af22 is performed, which purges the channel. However, if the next event is a layer 3 internal event 7 (L3₋₋ INT₋₋ EVENT₋₋ 7), which signifies that the current inseize instruction is to generate an inseize acknowlege, then atomic function af30 is performed which checks to see if the next inseize instruction is to receive stage N digits, followed by atomic function af1 which sets the next state to internal state 3 (IS3).

If the next event is L3₋₋ INT₋₋ EVENT₋₋ 0 or FALSE, which signifies that the next inseize instruction is not to receive stage N digits, then the protocol proceeds to perform atomic function af2 (transmitting a seizure acknowledge having bit values 1101). If the next event is L3₋₋ INT₋₋ EVENT₋₋ 1 or TRUE, atomic function 31 is performed which is a setup for R2 forward digit reception, followed by atomic function af2 (transmitting seizure acknowledge). Setup for digit reception typically involves allocation of a DSP resource found on a DSP card 16 (FIG. 1).

Next, atomic function af5 is performed, which sets a timer (timer1) to establish a waiting period for the expected first digit. This is followed by atomic function af1, which sets the next state to normal state 4 (NS4), which indicates that the inseizure has been acknowledged and that the channel is expecting to receive a Group 1 Forward MFR2 Signal.

Again, as shown in FIG. 7B, each sequence of atomic functions shown in FIG. 7A may be defined as a primitive (1-5). FIG. 7C shows the corresponding primitive table and state/event table for FIG. 7B.

FIG. 8A is another example of an application of the present invention in Network Protocol Layer 3 protocol for processing the initial phase of call setup using T1 E&M wink start signalling.

The protocol begins in a normal state (NS1) 80. Upon the receipt of bit values 11, which represent an inseizure, the atomic function af30 is performed, which tests whether collection of stage 1 digits is indicated. This is followed by atomic function af1, which sets the next state to internal state (IS2) 82.

If the next event is L3₋₋ INT₋₋ EVENT₋₋ 0 or FALSE, meaning that digit collection is not indicated, then the protocol performs atomic function af5 (setting timer1 for a pre-wink delay), followed by af1 to set the next state to normal state (NS3) 84. If the next event is L3₋₋ INT₋₋ EVENT₋₋ 1 or TRUE, meaning that digit collection is indicated, atomic function 31 is performed which is a setup for MFR1 digit reception, followed by af5 and af1.

Upon the expiration of timer1 (TIMER1₋₋ EXPIRATION), atomic function af2 is performed (wink on), followed by atomic functions af5 (setting a timer for the wink duration) and af1 to set the next state to normal state (NS4) 86. Again, upon the expiration of timer1, atomic function af2 is performed (wink off), followed by af5 (setting timer1 to wait for a digit string) and af1 to set the next state to normal state (NS5) 88.

FIG. 8B shows the correlation of between the atomic functions shown in FIG. 8A and primitives 1-5, and FIG. 8C shows the corresponding primitive table and state/event table by which a user or customer may define the described protocol.

FIG. 9A is an example of an application of the present invention in Call Processing Layer 4. In this example, the present invention is used to implement a protocol for providing interactive voice response (IVR) to an incoming call. The protocol begins in an IDLE state (S1) 90. Upon the receipt of a setup message (L3₋₋ SETUP₋₋ INDICATION), the atomic functions af1, af2, af3, af4 and af5 are performed. These atomic functions serve, respectively, to send an alerting message to Network Protocol Layer 3, to send a connect message (to answer the call) to Layer 3, to send a message to allocate a DSP resource for interactive digit string collection, to set timer1 to wait for allocation of the DSP resource and to set the next state to normal (wait) state (NS2) 92.

If the next event is the expiration of timer1 (TIMER1₋₋ EXPIRATION), atomic function af6 is performed to reset the channel. If the next event is receipt of a message indicating that the DSP resource was allocated, atomic function af7 is performed, which connects the caller to a desired announcement, followed by af4 which sets timer1 for digit wait, and af5 which sets the next state to normal state (S3) 94 to wait for digits.

If the next event is the expiration of timer1, the protocol again performs atomic function 7 (replays the announcement to the caller). If the next event is receipt of digits by the allocated DSP resource, the-atomic functions af8 (informing Layer 5 that digits were received), af4 (setting timer1 to wait for instruction from Layer 5) and af5 (setting the next state to normal state (S4) 96.

Again, FIGS. 9B and 9C show the relationships between the states, events, atomic functions and primitives which define the IVR protocol of FIG. 9A.

Finally, FIG. 10A is an example of an application of the present invention in the context of Application Layer 5. In this example, a protocol for an inbound application such as toll free (800) service is described.

The protocol begins in a normal state (S1) IDLE 98. Upon receipt of a request for service with digits message from Layer 4 (L4₋₋ REQ₋₋ FOR₋₋ SERV₋₋ WITH₋₋ DIGITS), atomic functions af1 (send an acknowledge message to Layer 4), af2 (sending to Layer 5 Route-Control (process) a message with a channel ID and digits), af4 (setting a timer to wait for a response from Layer 5 route control) and af5 (setting the next state to normal state (S2) 100) are performed.

In state (S2) 100, if the next event is the expiration of timer1, a channel failure has occurred and atomic function af8 is performed. If the next event is a message from Layer 5 route control to connect the channel which requested service, atomic function af7 is performed, which sends a message to Layer 4 to connect two channels. This is followed by af4, which sets a timer1 to wait for an acknowledgement that the connection was made, and then af5 which sets the next state to normal (wait) state (S4) 104.

In state (S4) 104, if the next event is expiration of timer1, a channel failure has occurred and atomic function af8 is performed. If the next event is a message from Layer 4 acknowledging that a connection was made (L4₋₋ L5nCONNECT₋₋ ACK), atomic function af6 disables timer1, followed by af5 which sets the next state to normal state (S5) 106. Upon receipt of a message from Layer 4 indicating release of the channel, atomic function af3 is used to send an acknowledgement to Layer 4, followed by af5 which returns the channel to the IDLE state 98.

With reference again to state 100, if the next event is a message from Layer 5 route control to queue the incoming call to a group, atomic function af9 is performed, which connects the-caller to a recorded announcement. This is followed by atomic function af4, which sets timer1 to wait for an acknowledgement from Layer 4, which is in turn followed by af5 to set the next state to normal state (S3) 102.

In state (S3) 102, if the next event is the expiration of timer 1, a channel failure has occurred and atomic function af8 is performed. If the next event is a message from Layer 4 acknowledging that a connection was made, af6 is performed to disable timer1 and af4 is performed to set timer2 for possible replay of the recorded announcement. Thus, if channel remains in state (S3) 102 long enough for timer2 to expire, the protocol will again perform af9 and replay the announcement.

If, however, in state (S3) 102 the next event is a message from Layer 5 route control to connect the channel which requested service, atomic function af6 is performed to disable timer2, followed by af7, which sends a message to Layer 4 to connect two channels. This is followed by af4, which sets a timer1 to wait for an acknowledgement that the connection was made, and then af5 which sets the next state to normal (wait) state (S4) 104.

FIGS. 10B and 10C show the relationships between the states, events, atomic functions and primitives which define the toll free service protocol of FIG. 10A.

The foregoing description has been limited to a specific embodiment of this invention. It will be apparent, however, that variations and modifications may be made to the invention, with the attainment of some or all of the advantages of the invention. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the true spirit and scope of the invention. 

What is claimed as new and desired to be secured by letters patent of the united states is:
 1. A method for developing a telecommunication application for performing call-processing functions, in a programmable telecommunications switch controlled by software having a layer model architecture and said switch also having an associated storage device, the method comprising the steps of:(a) defining a plurality of logical states, each one of said logical states representing a valid state of an associated telecommunication channel; (b) defining at least one event for each of said logical states, each said event representing a valid condition for causing a transition from one of said logical states to a different one of said logical states; (c) selecting one or more functions from a layer-dependent library of predetermined functions; and (d) associating said selected one or more functions with one or more of said logical states, whereby upon a transition into the associated state, said selected one or more functions are performed.
 2. The method of claim 2, further comprising the steps of:(e) storing said telecommunication application within said associated storage device; and (f) executing said telecommunication application.
 3. The method of claim 2, further comprising the steps of:(e) storing said telecommunication application within a host device, which includes said storage device, coupled to said programmable telecommunication switch; (f) transferring said telecommunication application to said telecommunication switch; and (g) executing said telecommunication application within said telecommunication switch.
 4. The method of claim 1, wherein said telecommunication application is one of a plurality of applications with one of said applications being assigned to execute and process events in respect of a channel of said switch, and wherein the method further comprises the steps of:(e) upon detection of an event at a channel of the switch, determining whether the application presently assigned to process said occurring event is capable of processing said occuring event; and (f) when said presently assigned application is incapable of processing said occurring event, dynamically selecting another one of said plurality of applications which is capable of processing said occurring event.
 5. The method of claim 1, wherein the switch further includes a state machine engine and further wherein said application comprises a finite state machine, said finite state machine being interpreted and implemented by said state machine engine whereby said developed telecommunication application is executed.
 6. The method of claim 1, wherein the application is created by a customer and downloaded to the programmable telecommunications switch for storage and processing.
 7. The method of claim 1, wherein the application is a telecommunication service application.
 8. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes toll-free service functions.
 9. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes voice mail service functions.
 10. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes automatic call distribution service functions.
 11. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes interactive voice-response functions.
 12. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes personal communications services functions.
 13. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes tone generation functions.
 14. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes call conferencing functions.
 15. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes call management functions.
 16. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes call progress tone control functions.
 17. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes inbound call routing and queuing functions.
 18. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes recorded announcement control functions for interactive voice response application support.
 19. The method of claim 7, wherein one of said call-processing functions performed by said telecommunication service application includes interactive digital collection functions.
 20. A system for developing a telecommunication application for performing call-processing functions related to an assigned one of a plurality of channels in a programmable telecommunications switch controlled by software having a layer model architecture and having a host device coupled to the switch, said switch also having an associated storage device, the system comprising:first defining means for defining a plurality of logical states, each one of said logical states representing a valid state of an associated telecommunication channel; second defining means for defining at least one event for each one of said logical states, each said event representing a valid condition for causing a transition to a different one of said logical states; selecting means for selecting one or more functions from a layer-dependent library of predetermined functions, and associating means for associating said selected one or more functions with one or more of said logical states, whereby upon a transition into the associated state, said selected one or more functions are performed; wherein the application performs said selected one or more functions upon the occurrence of said at least one event for which a logical state transition has been defined.
 21. The system of claim 20, further comprising:storing means for storing the application within the programmable telecommunication switch; and executing means for executing the application within said programmable telecommunication switch.
 22. The system of claim 20, further comprising:storing means for storing the application within said host device; transmitting means for transferring the application to the telecommunication switch;and executing means for executing the application within the telecommunication switch.
 23. The system of claim 20, wherein the application is one of a plurality of applications, and wherein the system further comprises:determination means for determining whether the application presently assigned to process said occurring event is capable of processing said occurring event upon detection of an event at a channel of the switch; and selection means for dynamically selecting another one of said plurality of applications which is capable of processing said occurring event when said presently assigned application is incapable of processing said occurring event.
 24. The system of claim 20, further comprising:a state machine engine, and wherein said application is comprised of a finite state machine, said finite state machine being interpreted and implemented by said state machine engine.
 25. The system of claim 20, wherein said application is created by a customer and downloaded to the programmable telecommunications switch for storage and processing.
 26. The system of claim 20, wherein the application is a telecommunication service application.
 27. The system of claim 26, wherein one of said call-processing functions performed by said telecommunication service application includes toll-free service functions.
 28. The system of claim 26, wherein one of said call-processing functions performed by said telecommunication service application includes voice mail service functions.
 29. The system of claim 26, wherein one of said call-processing functions performed by said telecommunication service application includes automatic call distribution service functions.
 30. The system of claim 26 wherein one of said call-processing functions performed by said telecommunication service application includes interactive voice-response functions.
 31. The system of claim 26, wherein one of said call-processing functions performed by said telecommunication service application includes personal communication services functions.
 32. The system of claim 26, wherein one of said call-processing functions performed by said telecommunication service application includes tone generation functions.
 33. The system of claim 26, wherein one of said call-processing functions performed by said telecommunication service application includes call conferencing functions.
 34. The system of claim 26, wherein one of said call-processing functions performed by said telecommunication service application includes call management functions.
 35. The system of claim 26, wherein one of said call-processing functions performed by said telecommunication service application includes call progress tone control functions.
 36. The system of claim 26 wherein one of said call-processing functions performed by said telecommunication service application includes inbound call routing and queuing functions.
 37. The system of claim 26 wherein one of said call-processing functions performed by said telecommunication service application includes recorded announcement control functions for interactive voice response application support.
 38. The system of claim 26, wherein one of said call-processing functions performed by said telecommunication service application includes interactive digital collection functions. 